﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace RL
{
    /// <summary>
    /// Логика взаимодействия для wParam.xaml
    /// </summary>
    public partial class wParam : Window
    {
        public wParam()
        {
            InitializeComponent();
        }

        private void buttonClose_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            App app = (App)App.Current;
            datePicker1.SelectedDate = app.WorkDate;
        }

        private void datePicker1_SelectedDateChanged(object sender, SelectionChangedEventArgs e)
        {
            App app = (App)App.Current;
            app.WorkDate = datePicker1.SelectedDate == null ? DateTime.Now : datePicker1.SelectedDate.Value;
        }
    }
}
